﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Text;

namespace Quaack
{
    public class Email
    {

        public void SendMail(string emailAddress, string title, string body)
        {
            MailMessage mail = new MailMessage("projectquaack@gmail.com", emailAddress, title, body);
            mail.IsBodyHtml = true;
            SmtpClient smtp = new SmtpClient("smtp.gmail.com");
            smtp.Credentials = new System.Net.NetworkCredential("projectquaack@gmail.com", "quaack2014");
            smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
            smtp.Port = 587;
            smtp.EnableSsl = true;
            smtp.Send(mail);
        }
    }
}